/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once

#include "sd-bus.h"

#include "output-mode.h"
#define MAX_LINE_LENGTH 100
#define DEFAULT_FILE_PATH "/usr/etc/tools/.log_cache"
#define DEFAULT_PROCESS_NAME "updpi"

struct log_cache {
	pid_t src_pid;
	pid_t dst_pid;
	uint64_t timestamp_us;
	int other;
};

extern int read_pid_and_timestamp(const char *filename, struct log_cache *log_cache);

int unit_show_processes(sd_bus *bus, const char *unit, const char *cgroup_path, const char *prefix, unsigned n_columns, OutputFlags flags, sd_bus_error *error);
